// 将对象的键值对已数组的方式保存在数组中
const obj = {
  name: "frank",
  age: 18,
};

console.log(Object.entries(obj));
const objEntries = Object.entries(obj);
objEntries.forEach(([key, value]) => {
  console.log(key, value);
});

console.log(Object.entries(["abc", "cba", "nba"]));
